<template>
    <div class="category">
        <h2>{{title}}</h2>
        <!-- 默认插槽 -->
        <slot name="default">默认内容</slot>
    </div>
</template>

<script lang="ts" setup name="Category">
defineProps(['title'])
</script>

<style scoped>
.category {
    background-color: aquamarine;
    border-radius: 10px;
    box-shadow: 0 0 10px;
    padding: 10px;
    width: 300px;
    height: 200px;
}
.category h2 {
    background-color: cadetblue;
}
</style>